<!-- Kareem New -->
<html> 
  <div id="search">
	<%= form_tag("/mob/friendship/#{@sid}/search_recomend", :method => "get") do %>
	  <%= text_field_tag(:query, "#{@query}", :class => "pull-left" , :style => "height:40px;width:73%",
	  									 :placeholder => 'Search' , :id => 'search_field') %>&nbsp;
	  <%= submit_tag('Search', :class => 'btn', :style => "height:40px;width:20%;padding-left:5px", :id => "search_button") %>
	<% end %>

  </div>
	<% if @query.nil? or @query == ''%>
		<h5> No results </h5>
	<% else %>
		<ul class="nav nav-list">
			<table style="width:100%;">
				<tr>
		 	<td align="left"><font size = "4"><b align ="left">Search Results</b></font></td>
		 	<td  align="right">	<%= link_to 'Back to Story',{:controller => 'stories',
					:action => 'get' , :id => "#{@sid}" }, 
					class: "btn btn-small" %></td>
				</tr></table>
			</ul>
				<ul class="nav nav-list ">
				<!--                -->	
				<%if @resulted_users == [] %>
				<br>
				<br>
				<h5>No Matches Found</h5>
				<%else%> 
				<!--                -->	
			<% @resulted_users.each do |member| %>
				<li class="divider"></li>
				<li><b> <%= if member.name.nil?  then member.email.split('@').first else "#{member.name}  (#{member.email})"  end %> </b></li>
					<div align="right">

				
				<%=	
					link_to 'Recomend Story',{:controller => 'stories',
						:action => 'recommend_success_mobile_show',

						:sid => @sid ,
						:lemail => "info@la2etlak.com", 
						:email => member.email, 
						:message => "I Recomend you to take a Look at  this Story"},
						class: "btn btn-warning btn-small"
				 %>
				</div>
			<% end %>	
		</ul>
	<% end %>
	<%end%>

</html>
